using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerSlideWallJump : PlayerState
{
    public PlayerSlideWallJump(Entity _entity, string _stateString) : base(_entity, _stateString)
    {
    }

    public override void Enter()
    {
        base.Enter();

        player.SetVelocity(-player.currentDir * 4f, player.jumpingForce);
        stateTimer = .2f;
    }

    public override void Exit()
    {
        base.Exit();
    }

    public override void Update()
    {
        base.Update();

        if (stateTimer < 0 || player.CanIsGround()) player.stateMachine.ChangeState(player.fallState);
    }
}
